#include <random>
#include <iostream>
#include <vector>
#include <algorithm>



#include <iostream>

#include <chrono>
using namespace std;
using namespace std::chrono;

template<typename TimeT = std::chrono::milliseconds>
struct measure
{
    template<typename F, typename ...Args>
    static typename TimeT::rep execution(F func, Args&&... args)
    {
        auto start = std::chrono::system_clock::now();

        // Now call the function with all the parameters you need.
        func(std::forward<Args>(args)...);

        auto duration = std::chrono::duration_cast< TimeT> 
                            (std::chrono::system_clock::now() - start);

        return duration.count();
    }
};

typedef measure<> Measure;

  size_t N = 1<<25;


template<class T>
int test()
{
    std::random_device rd;
    std::mt19937 gen(rd());
    std::uniform_int_distribution<> dis(1, 99);

    std::vector<T> v(N);

    for (int n=0; n<v.size(); ++n){
            v[n] = dis(gen) ;
    }

    sort(v.begin(), v.end());
}





int main()
{
    cout << "sorting integers"<< endl;
    cout << Measure::execution(test<int>) << endl; 
    cout << "sorting float"<< endl;
    cout << Measure::execution(test<float>) << endl;
}